Remediate fail-closed source and lifecycle/regress contracts#35
Remediate fail-closed source and lifecycle/regress contracts#35davidahmann merged 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5ad7cedf7c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| case identity.StateRevoked, identity.StateDeprecated, identity.StateUnderReview: | ||
| if strings.TrimSpace(reason) != "" { | ||
| record.ApprovalState = "revoked" | ||
| } | ||
| record.ApprovalState = "revoked" |
There was a problem hiding this comment.
Clear approval metadata on non-approved transitions
ApplyManualState now forces approval_state to revoked for review/deprecate/revoke, but it leaves the existing Approval fields intact. On the next scan, Reconcile calls applyApprovalState, which recomputes approval from Approval.Expires and can flip that same identity back to approval_state=valid if the old approval is still unexpired (e.g., approve -> revoke -> scan). This reintroduces contradictory lifecycle semantics and can affect regress behavior because isApproved treats approval_status=valid as approved.
Useful? React with 👍 / 👎.
Problem
scan --repo/--orgcould succeed without real GitHub acquisition and emit synthetic source data.Changes
--repo/--orgwhen--github-api/WRKR_GITHUB_API_BASEis missing.core/modelidentity-bearing finding classifier and reused it in scan lifecycle and regress snapshot extraction.new_unapproved_tooldrift.review/deprecate/revoke) to never leaveapproval_status=valid.--reasonis omitted.Validation
wrkr scan --path scenarios/wrkr/scan-mixed-org/repos --state .tmp/ship-readiness-state.json --jsonmake prepush-full